import { createApp } from "vue";
import App from "./App.vue";
import router from "@/router";
import "@/styles/reset.scss";
import 'element-plus/theme-chalk/el-message.css'
import 'element-plus/theme-chalk/dark/css-vars.css' // 暗黑模式
// element图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import pinia from "@/store";
import {hasBtn} from "@/directives/btn.ts";

/**
 * @ts-expect-error haha
 */
const app = createApp(App);
// 大菠萝
app.use(pinia);

app.use(router);

// 注册 element 图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component);
}

// 自定义指令
hasBtn(app);

app.mount("#app");
